package be.beeworks.scrumblebee

class Person {
    String userRealName
    String username
    String description
    String email
    boolean emailShow
    boolean enabled
    // MD5 password
    String passwd
    //plain password to create a MD5 password
    String pass = '[secret]'

    static hasMany = [teams: Team, authorities: Authority]

    static belongsTo = [Team,Authority]
    
    static constraints = {
        email(email: true, blank: false)
        userRealName(blank: false, maxSize: 100)
        username(blank: false, maxSize: 20, unique: true)
        description(nullable: true, maxSize: 2000)
	passwd(blank: false)
    }

    static transients = ['pass']
}
